@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'LXGWWenKaiMonoGB-Medium', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 全局粒子效果容器 */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.particles-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 主题背景 */
.app-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--theme-gradient);
}

/* 主题文字效果 */
.gradient-text {
  background-image: var(--theme-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  font-weight: 600;
}

.animate-gradient-flow {
  animation: gradient-flow 4s ease infinite;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 流动边框效果 */
.animate-border-flow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--theme-gradient);
  border-radius: inherit;
  z-index: -1;
  animation: border-flow 4s ease infinite;
  background-size: 200% 200%;
}

@keyframes border-flow {
  0% {
    background-position: 0% 50%;
    opacity: 0.8;
  }
  50% {
    background-position: 100% 50%;
    opacity: 1;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.8;
  }
}

/* 主题选中效果 */
.theme-selected {
  box-shadow: 0 8px 25px -10px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* 复选框悬停效果 */
.custom-hover {
  margin-top: -1px;
  transition:
    background-color 0.2s ease-in-out,
    border-color 0.2s ease-in-out,
    transform 0.1s ease-out;
}

.group:hover .custom-hover {
  transform: scale(1.05);
}

/* 移动设备优化 */
@media (pointer: coarse) {
  .checkbox-container {
    min-width: 44px;
    min-height: 44px;
  }

  .language-option {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .switch-container {
    min-width: 60px;
    min-height: 44px;
  }
}
